$(window).load(function(){
    $.post("book/findBook", {"tag" : "","currentNum" : 1}, function(r) {
        var obj=eval("("+r+")");
        var listPage=obj.listPage;
        //得到按钮
        var zhuye=$("#zhuye");
        var zhuyeIn="";
        var endBook=$("#endBook");
        var endBookIn="";
        $.each(listPage,function(index,obj){
            if(index<3){
                zhuyeIn+="<div class='feat_prod_box'><div class='prod_img'><a href='book/findBookProduct?bookId="+listPage[index].bookId+
                    "'><img src='"+domainStatic+"/images/prod1.gif' border='0' /></a></div><div class='prod_det_box'><div class='box_top'></div><div class='box_center'><div class='prod_title'>"+listPage[index].bookName+
                    "</div><p class='details'>我如果爱你 , 绝不像攀援的凌霄花  , 借你的高枝炫耀自己;<br />我如果爱你  , 绝不学痴情的鸟儿  , 为绿荫重复单调的歌曲  , 也不止像源泉  , 常年送来清凉的慰藉  ;</p>"+
                    "<a style='margin-left:16px'>阅读量:"+index+"2</a>"+
                    "<a href='jsp/category.jsp' class='more'>- 更多图书 -</a>"+
                    "<div class='clear'></div></div>"+
                    "<div class='box_bottom'></div>"+
                    "</div><div class='clear'></div></div>";

                endBookIn+="<div class='new_prod_box'><a href='book/findBookProduct?bookId="+listPage[index].bookId+"'>"+listPage[index].bookName+
                    "</a><div class='new_prod_bg'><span class='new_icon'><img src='"+domainStatic+"/images/promo_icon.gif' alt='' title='' /></span><a href='book/findBookProduct?bookId="+listPage[index].bookId+"'><img src='"+domainStatic+"/images/thumb2.gif' alt='' title='' class='thumb' border='0' /></a></div></div>"

            }else{
                return false;
            }

        });
        zhuye.html(zhuyeIn);
        endBook.html(endBookIn);
    })
})